/****************************************************************************
*                                                                           *
* material.h									                            *
*                                                                           *
* ALaRI 2008												                *
*                                                                           *
****************************************************************************/
#pragma once

#if !defined(__MATERIAL_H)
#define __MATERIAL_H

/****************************************************************************
* Includes										                            *
****************************************************************************/
#include "../../common/defs.h"
#include "scatmatrix.h"

#include <complex>
#include <QString>

/****************************************************************************
* Forward declaration							                            *
****************************************************************************/
class QString; 

/****************************************************************************
* CMaterial										                            *
****************************************************************************/
// resolution
static float s_fltDeltaR = 0.02f;

// frequency 
static float s_fltFreq = 2.4f;

// special precalculated constant equal to (2^1/2 * pi * 10^9 / c)
const float s_fltEPOWSpec = 14.819862f;

class CMaterial
{
public :
	/****************************************************************************
	* Constraction/Destruction						                            *
	****************************************************************************/
	CMaterial(const QString& strName, unsigned int nColor, 
		float fltA, float fltN, float fltDealtaR, float fltFreq); 
	
	~CMaterial();

	/****************************************************************************
	* Public workers								                            *
	****************************************************************************/
	inline CScatMatrix *getScatMatrix() const { return m_pScatMatrix; }
	inline QString name() const { return m_strName; }  
	inline unsigned int color() const { return m_nColor; }  
	inline float fltA() const { return m_fltA; }  
	inline float fltN() const { return m_fltN; }  
	inline std::complex<float> cfltTh0() const { return m_cfltTh0; }  

	std::complex<float> calculateKN2() const;
	/****************************************************************************
	* Public data																*
	****************************************************************************/

protected: 
	/****************************************************************************
	* Protected data								                            *
	****************************************************************************/
	QString				m_strName;
	unsigned int		m_nColor;
	float				m_fltA;
	float				m_fltN;
	std::complex<float>	m_cfltTh0;
	CScatMatrix			*m_pScatMatrix;
};

#endif /* __MATERIAL_H */
/****************************************************************************
* End of file																*
****************************************************************************/